﻿/*****************************************************************//**
 * @file    FITKViewAdaptorLoad_G_BF.h
 * @brief   Adaptor for body force.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-04-12
 *********************************************************************/

#ifndef __FITKVIEWADAPTORLOAD_G_BF_H__
#define __FITKVIEWADAPTORLOAD_G_BF_H__

#include "FITKVTKViewAdaptorBase.h"

#include "FITKVTKGraphAdaptorAPI.h"

namespace Exchange
{
    /**
     * @brief   Graph object data adaptor for 'body force'.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-04-12
     */
    class FITKVTKGRAPHADAPTORAPI FITKViewAdaptorLoad_G_BF : public FITKVTKViewAdaptorBase
    {
        // Regist
        FITKCLASS(Exchange, FITKViewAdaptorLoad_G_BF);

    public:
        /**
         * @brief   Constructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-12
         */
        explicit FITKViewAdaptorLoad_G_BF() = default;

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-12
         */
        ~FITKViewAdaptorLoad_G_BF() = default;

        /**
         * @brief   Execute the data exchange.[override]
         * @return  Is OK
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-12
         */
        bool update() override;

    };

    // Type define.
    typedef FITKViewAdaptorLoad_G_BF FITKViewAdaptorLoadGravity;
    typedef FITKViewAdaptorLoad_G_BF FITKViewAdaptorLoadBodyForce;

    // Regist body force adaptor
    Register2FITKViewAdaptorFactory(Load_G_BF, Interface::FITKAbaLoadBodyForce, FITKViewAdaptorLoad_G_BF, 1);

    // Regist gravity adaptor
    Register2FITKViewAdaptorFactory(Load_G_BF, Interface::FITKAbaLoadGravity, FITKViewAdaptorLoad_G_BF, 2);
}   // namespace Exchange

#endif // __FITKVIEWADAPTORLOAD_G_BF_H__
